-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add standalone dbs and configs #1354
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
darioush
reviewed
Oct 14, 2024
darioush
previously approved these changes
Oct 15, 2024
darioush
reviewed
Oct 15, 2024
darioush
reviewed
Oct 16, 2024
darioush
approved these changes
Oct 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the
plugin/evm
package to support standalone databases, update configurations, and enhance testing. The most important changes include adding new database-related configurations, updating theVM
struct and initialization process, and modifying tests to accommodate the newskipStandaloneDB
flag.Database Configuration Enhancements:
plugin/evm/config.go
: Added new database-related configurations includingUseStandaloneDatabase
,DatabaseConfigContent
,DatabaseConfigFile
,DatabaseType
,DatabasePath
, andDatabaseReadOnly
. Also added a new typePBool
to handle optional boolean values. [1] [2] [3] [4]VM Struct and Initialization Updates:
plugin/evm/vm.go
: Updated theVM
struct to include askipStandaloneDB
flag andchainAlias
. Modified theInitialize
method to handle standalone database initialization and metrics setup. Added new methodsuseStandaloneDatabase
,getDatabaseConfig
,initializeDBs
, andcreateDatabase
to support the new database configurations. [1] [2] [3] [4] [5]By default VM uses a standalone database if there is no accepted block in AvalancheGo's provided database.
use-standalone-database
is nil by default, and can override the default behavior by takingfalse/true
as value.Test Updates:
plugin/evm/block_test.go
,plugin/evm/syncervm_test.go
,plugin/evm/tx_gossip_test.go
,plugin/evm/vm_test.go
: Updated various test cases to set theskipStandaloneDB
flag totrue
to ensure tests run with the intended database configuration. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]These changes enhance the flexibility and configurability of the EVM plugin, allowing for more robust database management and testing.
How this was tested
Tested with DFK
How is this documented
Need to document in docs repo.
Some metrics running the LevelDB in DFK testnet with two similar spec machines: